package com.breeze.blockchain.message;

import com.breeze.blockchain.common.constant.SystemConstant;
import com.breeze.components.message.delay.holder.RedisDelayQueueHolder;
import com.breeze.components.message.secure.SecureInvoke;
import java.time.LocalDateTime;
import org.springframework.stereotype.Component;

/**
 * @author breeze
 */
@Component
public class RedissonDelayQueueHolder extends RedisDelayQueueHolder {

  @SecureInvoke(maxRetryTimes = SystemConstant.MAX_RETRY_TIME)
  public void addDelayJob(Object value, LocalDateTime delayTime, DelayJobQueue queueName) {
    super.addJob(value, delayTime, queueName.queueName());
  }
}
